<?php


$cityname = $area ? areaname($area) : $cityname;

$html .= '<b>当前城市：</b>'.$cityname.'<br /><br />';



/*地区*/

if($area){
    $arealen = strlen($area);
    if(checksubarea($area)){
        foreach($AREA AS $k=>$v){
            if((strlen($k)==$arealen+2) && (substr($k,0,$arealen)==$area)){
                    $html .= "<a href=\"index.php?file=citylist&area=$k\">$v[areaname]</a>&#160;  ";
            }
        }
    }else{
        foreach($AREA AS $k=>$v){
            if((strlen($k)==$arealen+2) && (substr($k,0,$arealen)==$area)){
                    $html .= "<a href=\"index.php?file=index&amp;acode=$k\">$v[areaname]</a>&#160; ";
            }
        }
    }
}else{
    foreach($AREA AS $k=>$v){
        if(strlen($k)==2) $html .= "<a href=\"index.php?file=citylist&area=$k\">$v[areaname]</a>&#160; ";
    }
}

/*地区*/

$html .= "<br/><br/>";

if($area){
    $html .= "进入：<a href=\"index.php?file=index&amp;acode=$area\">".areaname($area)."站>></a>&#160; ";
}

$html .= "<br/><br/>";

if($acode){
    $html .= '<anchor title="back">返回'.areaname($acode).'<prev/></anchor> <br/>';
}elseif($area){
    $html .= '<anchor title="back">返回<prev/></anchor> <br/>';
}

include mtpl('citylist');
?>